package StudyCode.summary.mycollection;

import java.util.BitSet;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingTheNewBitSetMethodsInJava7 {
	public static void main(String[] args) {
		BitSet bitSet = new BitSet();
		long[] array = {1, 21, 3};
		bitSet = BitSet.valueOf(array);
		System.out.println(bitSet);

		long[] tmp = bitSet.toLongArray();
		for (long number : tmp) {
			System.out.println(number);
		}
		System.out.println(bitSet.previousSetBit(1));
		System.out.println(bitSet.previousClearBit(66));

	}
}
